<!doctype html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:margin-top="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <meta name="description" content=""/>
    <meta name="author" content=""/>
    <title>我的订单详情页面</title>
    <link href="https://cdn.bootcss.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet"/>
    <style type="text/css" rel="stylesheet">
        #size {
            margin-top: 10px;
            font-size: 15px;
        }

        #yuyan {
            margin-top: 10px;
            font-size: 15px;
        }

        #yuyan li {
            margin-top: 11.3px;
        }

    </style>

</head>

<body>
<div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom box-shadow">
    <h5 class="my-0 mr-md-auto font-weight-normal">快马跑腿</h5>
    <nav class="my-2 my-md-0 mr-md-3">
        <a class="p-2 text-dark" th:href="@{/order/index}">首页</a>
        <a class="p-2 text-dark" th:href="@{/order/addForSell}">帮我买</a>
        <a class="p-2 text-dark" th:href="@{/order/addForDeliver}">帮我送</a>
        <a class="p-2 text-dark" th:href="@{/order/addForTake}">帮我取</a>
        <td>
            <a class="p-2 text-dark"  th:if="${customer.type ==1}" th:href="@{/client/aboutUs}">关于我们</a>
            <a class="p-2 text-dark"  th:if="${customer.type ==2}" th:href="@{/order/list}">我的配送</a>

        </td>
    </nav>
    <nav id="navbar-example2" class="navbar navbar-light bg-light">
        <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
           aria-expanded="false" th:text="${customer.nickname}">Dropdown</a>
        <div class="dropdown-menu">
            <a class="dropdown-item" th:href="@{/client/info}">个人信息</a>
            <a class="dropdown-item" th:href="@{/order/myOrder}">我的订单</a>
            <div role="separator" class="dropdown-divider"></div>
            <a class="dropdown-item" th:href="@{/publiz/index}">注销</a>
        </div>
    </nav>
</div>
<div class="container" id="size">
    <a>您现在的位置：
        <a th:text="首页" th:href="@{/order/index}"></a> >
        <a th:text="我的订单" th:href="@{/order/myOrder}"></a> >
        <a th:text="订单详情" th:href="@{/order/detail(id=${order.id})}"></a>
    </a>
</div>

<div class="container" style="margin-top: 10px">
    <div class="card" style="background-color: #fff7eb">
        <div class="card-body">
            <h5 class="card-title">当前订单状态：
                <td>
                    <span th:if="${order.status == 1}">下单成功</span>
                    <span th:if="${order.status == 2}">已指派</span>
                    <span th:if="${order.status == 3}">配送中</span>
                    <span th:if="${order.status == 4}">已送达</span>
                    <span th:if="${order.status == 5}">已收货</span>
                    <span th:if="${order.status == 6}">已评价</span>
                </td>
            </h5>
            <div id="yuyan">
                <li>
                    <span th:if="${order.status == 1}">订单已下单成功，清耐心等候</span>
                    <span th:if="${order.status == 2}">订单已指派，请耐心等待</span>
                    <span th:if="${order.status == 3}">订单已配送中，请耐心等待</span>
                    <span th:if="${order.status == 4}">订单已送达，请确认查询</span>
                    <span th:if="${order.status == 5}">订单已经确认收货，请确认查询</span>
                    <span th:if="${order.status == 6}">订单已完成评价</span>
                </li>
                <li>
                    <a>下单高峰期有可能延迟送达，建议您10分钟后拨打派送员电话或联系我们进行查询。</a>
                </li>
                <li>
                    <span th:if="${customer.type == 1}">如购买物品未收到，您可以到我的订单页面申请售后，申请后系统将通知卖家在3天内为您处理，请耐心关注维权结果。</span>
                    <span th:if="${customer.type == 2}">如送达物品未收到，您可以到已买到的宝贝页面申请售后，申请后系统将通知卖家在3天内为您处理，请耐心关注维权结果。</span>
                    <span th:if="${customer.type == 3}">如取货物品未收到，您可以到已买到的宝贝页面申请售后，申请后系统将通知卖家在3天内为您处理，请耐心关注维权结果。</span>
                </li>
                <li>
                    <a>其他问题请点击咨询，<a href="#"> 人工客服</a></a>
                </li>
            </div>
                <a th:if="${order.status == 1}" class="btn btn-info" style="margin-top: 11.3px" th:href="@{/order/confirm(id=${order.id})}">确认收货</a>
                <a th:if="${order.status == 2}" class="btn btn-info" style="margin-top: 11.3px" th:href="@{/order/confirm(id=${order.id})}">确认收货</a>
                <a th:if="${order.status == 3}" class="btn btn-info" style="margin-top: 11.3px" th:href="@{/order/confirm(id=${order.id})}">确认收货</a>
                <a th:if="${order.status == 4}" class="btn btn-info" style="margin-top: 11.3px" th:href="@{/order/confirm(id=${order.id})}">确认收货</a>
                <a th:if="${order.status == 5}" class="btn btn-info" style="margin-top: 11.3px" th:href="@{/order/evaluate(id=${order.id})}">评价</a>
                <a th:if="${order.status == 6}" class="btn btn-info" style="margin-top: 11.3px" th:href="@{/order/evaluate(id=${order.id})}">再次评价</a>
                <a th:if="${order.status == -1}" class="btn btn-info" style="margin-top: 11.3px">#</a>

        </div>
    </div>
    <footer class="pt-4 my-md-5 pt-md-1 border-top"></footer>
</div>
<div class="container">
    <h5>订单信息</h5>
    <div class="card" style="background-color: #fff7eb">
        <div class="container-fluid">
            <table class="table">
                <thead>
                <tr>
                    <th>操作类型</th>
                    <th>操作用户</th>
                    <th>评价内容</th>
                    <th>操作时间</th>
                </tr>
                </thead>
                <tr>
                    <span>
                        <td th:if="${order.type == 1}">帮我买</td>
                        <td th:if="${order.type == 2}">帮我送</td>
                        <td th:if="${order.type == 3}">帮我取</td>
                    </span>
                    <td th:text="${order.creator.nickname}">用户昵称</td>
                    <span>
                        <td th:if="${order.evaluateContent != null}" th:text="${order.evaluateContent}">购买物品</td>
                        <td th:if="${order.evaluateContent == null}" text="#">暂未评价</td>
                    </span>
                    <td th:text="${#dates.format(order.createTime,'yyyy-MM-dd HH:mm:ss')}">时间日期</td>
                </tr>
            </table>
        </div>
    </div>

</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.slim.min.js"
        integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
        crossorigin="anonymous"></script>
<script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js"
        integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
        crossorigin="anonymous"></script>
<script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js"
        integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
        crossorigin="anonymous"></script>

</body>
</html>